package com.suxin.exception;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Tang
 * @classname ExceptionConfig
 * @description [  ]
 * @date 2022/10/12 10:40
 */
@Configuration
public class ExceptionConfig {

    @Bean
    AbstractExceptionRegister exceptionRegisterKingA() {
        return new ExceptionRegisterKingA();
    }

    @Bean
    @ConditionalOnMissingBean(value = {AbstractExceptionRegister.class})
    AbstractExceptionRegister defaultExceptionRegister() {
        return new DefaultExceptionRegister();
    }

}
